package client.comm.commlib.base

import android.app.Activity
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent

class FinishReciver : BroadcastReceiver() {

    companion object {
        val FINISH_ACTION: String = "FinishReceiver.login.lout"
    }

    override fun onReceive(context: Context?, intent: Intent?) {
        intent.let {
            when (it?.action) {
                FINISH_ACTION -> {
                    if (context is BaseActivity<*, *>)
                        (context).finish()
                }
            }
        }
    }
}